<!doctype html>
<html lang="zh-CH">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	{{--<meta name="viewport" content="width=device-width, initial-scale=1">--}}
	<title>央票通</title>
	<link rel="stylesheet" href="./resource/css/index.css">
	<link rel="stylesheet" href="./resource/css/user.css">
</head>
<body>
<!-- 头部 -->
@include('common.index_head')
<!-- 个人中心 -->
<div class="cont-user">
	<!-- 个人中心头部 -->
	@include('common.user_head')
	<div class="user-center">
		<div class="main">
			<!-- 个人中心列表 -->
			@include('common.user_left')
			<div class="user-container left">
				<div class="user-title user-password user-ticket">
					<div class="title">
						<div class="h left">投资记录</div>
					</div>
					<div class="user-box">
						<div class="pass-cont">
							<div class="ticket-inquire"> 
								<div class="news">
									<div>投资总金额：<span>￥<?php if(!empty($datanum)){ echo $datanum;}else{echo"0";}?></span></div>
									<div class="cen">投资总收益：<span>￥<?php if(!empty($datagains)){ echo round("$datagains",2);}else{echo"0";}?></span></div>
									<div>投资待收益：<span>￥<?php if(!empty($datpende)){ echo round("$datpende",2);}else{echo"0";}?></span></div>
								</div>
								<div class="form">
									{{--<form action="/sel_date" method="get" >--}}
										<div class="form-group">
											<label for="">投资日期</label>
											<select name="year1" id="year1" class="form-control">
											</select>
											<span class="first">年</span>
											<select name="month1" id="month1" class="form-control form-mon">
											</select>
											<span>月</span>
										</div>
										<div class="form-group">
											<label for="">投资项目</label>
											<select name="p_type" id="p_type" class="form-control">
												{{--<option value="0">请选择</option>--}}
												<option value="1">央票通</option>
												<option value="2">上市通</option>
											</select>
										</div>
										<button type="submit" class="btn btn-default">查询</button>
									{{--</form>--}}
								</div>
							</div>
							<div id="list8">
								{{$info}}
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>

<!-- footer -->
@include('common.index_foot')
<script src="./resource/js/jquery-1.11.3.min.js"></script>
<script src="./resource/js/index.js"></script>
<script src="./resource/js/user.js"></script>
<script src="./resource/js/YMDClass.js"></script>
<script src="./resource/js/T.js"></script>
<!-- 年月下拉 -->
<script>
	var myDate = new Date();
	var year = myDate.getFullYear();
	var month = myDate.getMonth()+1;
	new YMDselect('year1','month1',year,month);
</script>
<script type="text/javascript">

//	$('ul.pagination li').eq(1).addClass('active');
	$(document).delegate('.page','click',function(){
		var data = $(this).data();
	//$(this).parent().addClass('active').siblings().removeClass('active');
			T.restPost('/user_invest_page', data, function (response) {
				console.log(response.data.state);
				$("#list8").html(response.data.state);
		});
	});
</script>
<script>
	$('.btn.btn-default').click(function(){
		var year1  = $("#year1").val();
		var month1 = $("#month1").val();
		var p_type = $("#p_type").val();
		$.ajax({
			data:'year1='+year1+'&month1='+month1+'&p_type='+p_type+'&page='+1,
			url:'/user_invest_ticket',
			type:'post',
			success:function(msg){
				$("#list8").html(msg);
			}
		})
	})
</script>
</body>
</html>